import { useRoutes, Navigate } from "react-router-dom";
import React from "react";
// import Home from React.lazy(() => import("@/pages/Home/Home"));
// import About from React.lazy(() => import("@/pages/About/About"));
import Home from "../pages/Home/Home.jsx";
import About from "../pages/About/About.jsx";
import CheckOut from "../pages/CheckOut/CheckOut.js";

const Element = () => useRoutes([
  {
    path: '/about',
    element: <About />
  },
  {
    path: '/home',
    element: <Home />
  },
  {
    path: '/CheckOut',
    element: <CheckOut />
  },
  {
    path: '/',
    element: <Navigate to='/home' />
  }
]);

export default Element;